package com.fastjrun.springcloud.simple.service.impl;

import com.fastjrun.springcloud.simple.service.FromService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Service;

@Service
@RefreshScope
public class FromServiceImpl implements FromService {


    @Value("${app.version:versionDefault}")
    private String version;  //    @Value注解来获取server端参数的值
    @Value("${message:messageDefault}")
    private String message;  //    @Value注解来获取server端参数的值

    @Override
    public String from() {
        String s = "version：" + this.version + message;
        return s;
    }
}
